import React from 'react';
import {
    Routes,
    Route,
    Navigate, NavLink,useRoutes
} from "react-router-dom";
import renderRouter from "./routes"
function App(props) {

    return (
        <div>
            <nav>
                <NavLink to={"/"}>首页</NavLink>
                <NavLink to={"/my"}>个人中心</NavLink>
                <NavLink to={"/goodsList/13.php"}>商品列表</NavLink>
            </nav>
            {
                renderRouter()
            }
            {/*<Routes>*/}
            {/*    <Route path={"/"} element={<Home/>}></Route>*/}
            {/*    <Route path={"/my"} element={<My/>}>*/}
            {/*        /!*<Route path={"/my"} element={<Navigate to={"newsList"}/>}></Route>*!/*/}
            {/*        <Route index element={<div>我的新闻列表</div>}></Route>*/}
            {/*        <Route path={"goodsList"} element={<div>我的商品列表</div>}></Route>*/}
            {/*    </Route>*/}
            {/*    <Route path={"/goodsList/:id.php"} element={<GoodsList/>}> </Route>*/}
            {/*    <Route path={"/detail/:id"} element={<Detail/>}></Route>*/}
            {/*    <Route path={"*"} element={<Navigate to={"/my"}/>}></Route>*/}
            {/*</Routes>*/}

        </div>
    );
}

export default App;